<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui">

<h:head>
	<style>
.ui-widget,.ui-widget .ui-widget {
	font-size: 11px !important;
}
</style>

	<title>Consultar Conta Receber</title>
	<link rel="stylesheet" type="text/css" href="css/estilos.css" />
</h:head>
<body>
	<h:form id="form">
		<p:panel id="cContaReceberPanel" style="border: none;">
			<h2>Consulta de Contas a Receber</h2>
			<h:panelGrid columns="3">
				<h:selectOneRadio id="cContaRTipoConsulta"
					binding="#{beanContaReceber.campo}">
					<f:selectItem itemLabel="Nota" itemValue="N" />
					<f:selectItem itemLabel="Serie" itemValue="S" />
					<f:selectItem itemLabel="Data de Emissao" itemValue="D" />
					<f:selectItem itemLabel="Data de Recebimento" itemValue="DR" />
					<f:selectItem itemLabel="Fornecedor" itemValue="F" />
					<f:selectItem itemLabel="Valor" itemValue="T" />
				</h:selectOneRadio>
			</h:panelGrid>

			<h:panelGrid columns="2">
				<p:inputText id="cContaRFiltro"
					value="#{beanContaReceber.campoFiltro}" size="86" />

				<p:commandButton id="cContaRFind" value="Buscar"
					icon="ui-icon-search" action="#{beanContaReceber.find}"
					update="cContaRContas" />
			</h:panelGrid>

			<p:separator />

			<br></br>
			<p:separator />

			<p:dataTable value="#{beanContaReceber.contasReceber}" var="conta"
				id="cContaRContas" emptyMessage="Nenhuma conta encontrada">
				<p:column headerText="Nota">
					<h:outputText value="#{conta.venda.nota}" />
				</p:column>
				<p:column headerText="Serie">
					<h:outputText value="#{conta.venda.nota}" />
				</p:column>
				<p:column headerText="Cliente">
					<h:outputText value="#{conta.venda.cliente.nome}" />
				</p:column>
				<p:column headerText="Data Emissao">
					<h:outputText value="#{conta.venda.criacao}" />
				</p:column>
				<p:column headerText="Data Recebimento">
					<h:outputText value="#{conta.dataRecebimento}" />
				</p:column>
				<p:column headerText="Total">
					<h:outputText value="#{conta.valor}" />
				</p:column>
				<p:column width="10">
					<p:commandButton id="cContaReceberSelectConta"
						icon="ui-icon-search" />
				</p:column>
			</p:dataTable>

			<p:separator />

			<h:panelGrid columns="4">
				<p:commandButton id="cContaReceberNovo" value="Novo"
					action="manterContaReceber" />
				<p:commandButton id="cContaReceberVoltar" value="Voltar"
					onclick="history.back()" />
			</h:panelGrid>
		</p:panel>

	</h:form>

</body>
</html>